package com.nuc.kl.module.kpoint.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.nuc.kl.base.DaoSupportImpl;
import com.nuc.kl.module.kpoint.dao.ReferenceDao;
import com.nuc.kl.module.kpoint.entity.Reference;
import com.nuc.kl.module.kpoint.service.ReferenceService;

@Service
@Transactional
public class ReferenceServiceImpl extends DaoSupportImpl<Reference> implements ReferenceService{

	@Resource
	private ReferenceDao referenceDao;
	
	public void deleteByIds(String ids) {
		
		String[] arrId = ids.split(",");
		for (String str : arrId) {
			this.delete(Long.parseLong(str));
		}
	}

	public List<Reference> searchPageByIndex(int start, int number,
			Map<String ,Object> m) {
		
		List<Reference> list = referenceDao.searchPageByIndex(start,number,m);
			
		return list;
	}
	
}
